import httpDict from '@/utils/httpDict'
import http from '@/utils/http'

// 根据类型获取字典数据
export const getDictList = (params: any) => {
  return httpDict.get({
    url: `/api/dict/data/page?page=1&limit=1000&dictType=${params.type}&dictLabel=${params.label}`
  })
}

export const getDictAreaList = (params: any) => {
  return httpDict.get({
    url: `/api/dict/data/page?page=1&limit=1000&dictType=area&dictLabel=${params.label}&parentId=${params.parentId}`
  })
}

// 医疗信息获取
export const getMedicalInfo = (params: any) => {
  return http.get({
    url: `/api/patient/info/patient/extlist?empi=${params.empi}`
  })
}

// 保存医疗信息
export const saveMedicalInfo = (params: any) => {
  return http.post({
    url: `/api/patient/info/history/save`,
    data: params
  })
}

// 患者信息更新
export const updatePatientInfo = (params: any) => {
  return http.post({
    url: `/api/patient/info/update`,
    data: params
  })
}
